<?php 
		//$Id: vars.brew.php 395 2009-03-12 06:41:28Z cameron.bracken $
		
		//Run Parameter file template.
		//When the user clicks the 'Load Data' button, this file is copied to 
		//sandbox/www/vars.php.  Values inside of the <%= %> tags are filled in 
		//by running load-run.R which is called by load-run.php.  The load-run.php
		//is actually what gets ran when 'Load Data' is pressed. 
		
		//maximum number sumulation days to allow
		$maxdays = 3;
		
		//The maximum number of run files to save
		$max_saved_runs = 20;
		
		// With of the plot on the results page (px)
		$plot_width = '800px';
		
		// With of the plot on the results page (px)
		$plot_height = '400px';
		
		//The directory containing the previous runs parameter files
		$runsdir = "sandbox/runs";
		
		//The directory containing the output of previous runs
		$outdir = "sandbox/output/data";
		
		//The directory containing the output log of previous runs
		$logdir = "sandbox/output/logs";
		
		//The directory containing the output images of previous runs
		$imgdir = "sandbox/output/img";
		
		//The name of the file that the parameters were loaded from
		$loaded_run_file = '<%=v$loaded_run_file%>';
		$loaded_time = '<%=v$loaded_time%>';
		
		//Simualtion length
		$simlen = '<%=v$simlen%>';
		
		//Plant inflow for the next three days, first element is ignored
		$inflow = array('',
			'<%=v$plant_inflow_rate_day1%>',
			'<%=v$plant_inflow_rate_day2%>',
			'<%=v$plant_inflow_rate_day3%>'
			);
		
		//Rainfall for the next three days, first element is ignored
		$rainfall = array('',
			'<%=v$rainfall_day1%>',
			'<%=v$rainfall_day3%>',
			'<%=v$rainfall_day3%>'
			);
		$target_wetland_influent = '<%=v$target_wetland_influent%>';
		
		//Pond heights
		$pond_height = array(	
			"Ox1" => '<%=v$pond_height_Ox1%>',
			"Ox2" => '<%=v$pond_height_Ox2%>',
			"Ox3" => '<%=v$pond_height_Ox3%>',
			"Allen" => '<%=v$pond_height_Allen%>',
			"Gearheart" => '<%=v$pond_height_Gearheart%>',
			"Hauser" => '<%=v$pond_height_Hauser%>'
			);
			
		//Ponds which have automatically adjustable weirs 
		//0 = no automatic settings
		//1 = target height 
		//2 = target flow
		$auto = array(	
			"Ox1" => '<%=v$auto_Ox1%>',
			"Ox2" => '<%=v$auto_Ox2%>',
			"TM1" => '<%=v$auto_TM1%>',
			"TM2" => '<%=v$auto_TM2%>',
			"TM3" => '<%=v$auto_TM3%>',
			);
		
		//The height if target height is selected
		$target_ht = array(	
			"Ox1" => '<%=v$target_height_Ox1%>',
			"Ox2" => '<%=v$target_height_Ox2%>',
			"TM1" => '<%=v$target_height_TM1%>',
			"TM2" => '<%=v$target_height_TM2%>',
			"TM3" => '<%=v$target_height_TM3%>',
			);

		//The flow of target flow is selected
		$target_flow = array(	
			"Ox1" => '<%=v$target_flow_Ox1%>',
			"Ox2" => '<%=v$target_flow_Ox2%>',
			"TM1" => '<%=v$target_flow_TM1%>',
			"TM2" => '<%=v$target_flow_TM2%>',
			"TM3" => '<%=v$target_flow_TM3%>',
			);
				
		//description of where pond height is measured				
		$desc = array(
			"Ox1" => "Oxidation Pond #1 surface elevation measured at staff guage on North weir box (closest to treatment plant)",
			"Ox2" => "Oxidation Pond #2 surface elevation measured at staff guage west marsh #2 weir box",
			"Ox3" => "Oxidation Pond #3 surface elevation measured at water height from outlet box top",
			"TM1" => "Treatment Marsh #1 surface elevation measured water height above NW corner box in inches",
			"TM2" => "Treatment Marsh #2 surface elevation measured at staff guage on weir box (closest to Marsh #1)",
			"TM3" => "Treatment Marsh #3 surface elevation measured at staff guage on North weir box (closest to treatment plant)",
			"TM4" => "Treatment Marsh 4",
			"Chlorine" => "Chlorine Contact Basin",
			"Allen" => "Allen Marsh staff guage",
			"Gearheart" => "Gearheart surface elevation measured at staff guage measurement on South West weir box",
			"Hauser" => "Hauser Marsh"
			);
				

		//Weir Settings
		$weirs = array(
			"Ox2_TM1_1" => '<%=v$weir_height_Ox2_TM1_1%>',
			"Ox2_TM1_2" => '<%=v$weir_height_Ox2_TM1_2%>',
			"Ox2_TM2_1" => '<%=v$weir_height_Ox2_TM2_1%>',
			"Ox2_TM2_2" => '<%=v$weir_height_Ox2_TM2_2%>',
			"Ox3_TM3" => '<%=v$weir_height_Ox3_TM3%>',
			);

		//Pumping rates
		$pumps = array(
			"PP_1" =>'<%=v$pump_rate_PP_1%>',
			"PP_2" =>'<%=v$pump_rate_PP_2%>',
			"PP_3" =>'<%=v$pump_rate_PP_2%>',
			"SP_1" =>'<%=v$pump_rate_SP_1%>',
			"SP_2" =>'<%=v$pump_rate_SP_2%>',
			"SP_3" =>'<%=v$pump_rate_SP_3%>',
			"SP_4" =>'<%=v$pump_rate_SP_4%>',
			);
			
		//Pumping offset
		$offset = array(
			"PP_1" =>'<%=v$offset_PP_1%>',
			"PP_2" =>'<%=v$offset_PP_2%>',
			"PP_3" =>'<%=v$offset_PP_3%>',
			"SP_1" =>'<%=v$offset_SP_1%>',
			"SP_2" =>'<%=v$offset_SP_2%>',
			"SP_3" =>'<%=v$offset_SP_3%>',
			"SP_4" =>'<%=v$offset_SP_4%>'
			);

		//Number of hours to run pumps
		$hours = array(
			"PP_1" =>'<%=v$hours_PP_1%>',
			"PP_2" =>'<%=v$hours_PP_2%>',
			"PP_3" =>'<%=v$hours_PP_3%>',
			"SP_1" =>'<%=v$hours_SP_1%>',
			"SP_2" =>'<%=v$hours_SP_2%>',
			"SP_3" =>'<%=v$hours_SP_3%>',
			"SP_4" =>'<%=v$hours_SP_4%>'
			);
		
		//Is the pump on or not
		$pump_on = array(
			"PP_1" => '<%=v$pump_on_PP_1%>',
			"PP_2" => '<%=v$pump_on_PP_2%>',
			"PP_3" => '<%=v$pump_on_PP_3%>',
			"SP_1" => '<%=v$pump_on_SP_1%>',
			"SP_2" => '<%=v$pump_on_SP_2%>',
			"SP_3" => '<%=v$pump_on_SP_3%>',
			"SP_4" => '<%=v$pump_on_SP_4%>'
			);


		//Descriptions of all of the connections
		$con= array(
			"Ox1_Ox2_West"          =>"Ox2 to Ox3 (West)",
			"Ox1_Ox2_East"          =>"Ox2 to Ox3 (East)",
			"Ox2_TM1_1"             =>"Ox2 to TM1 (1)",
			"Ox2_TM1_2"             =>"Ox2 to TM1 (2)",
			"Ox2_TM2_1"             =>"Ox2 to TM2 (1)",
			"Ox2_TM2_2"             =>"Ox2 to TM2 (2)",
			"Ox2_Ox3_North"         =>"Ox2 to Ox3 (North)",
			"Ox2_Ox3_South"         =>"Ox2 to Ox3 (South)",
			"Ox2_Ox2Box"            =>"Ox2 to Stilling Tower",
			"Ox2Box_TM4"            =>"Stilling Tower to TM4",
			"Ox3_TM3"               =>"Ox3 to TM3",
			"PP_1"             		=>"Ox3 to Ox3 Well - Pond Pump 1 (0.9 MGD)",
			"PP_2"            		=>"Ox3 to Ox3 Well - Pond Pump 2 (0.9 MGD)",
			"PP_3"            		=>"Ox3 to Ox3 Well - Pond Pump 3 (1.5 MGD)",
			"SP_1"	             	=>"Ox3 to Chlorine Contact - Ox3 Storm Pump 1 (2.4 MGD)",
			"SP_2"             		=>"Ox3 to Chlorine Contact - Ox3 Storm Pump 2 (1.6 MGD)",
			"SP_3"             		=>"Ox2 to Chlorine Contact - Ox2 Storm Pump 1 (2 MGD)",
			"SP_4"             		=>"Ox2 to Chlorine Contact - Ox2 Storm Pump 2 (2 MGD)",
			"TM1_TBox"              =>"TM1 to TBox",
			"TBox_Chl"              =>"TBox to Chlorine Contact Basin",
			"TM2_TBox_MSouth"       =>"TM2 to TBox (Most South)",
			"TM2_TBox_South"        =>"TM2 to TBox (South)",
			"TM2_TBox_North"        =>"TM2 to TBox (North)",
			"TM2_TBox_MNorth"       =>"TM2 to TBox (Most North)",
			"TM3_TBox_MWest"        =>"TM3 to TBox (Most West)",
			"TM3_TBox_West"         =>"TM3 to TBox (West)",
			"TM3_TBox_East"         =>"TM3 to TBox (East)",
			"TM3_TBox_MEast"        =>"TM3 to TBox (Most East)",
			"TM4_TM1"               =>"TM4 to TM1",
			"Chl_Allen"             =>"Chlorine Contact to Allen",
			"Allen_Gearheart_1"     =>"Allen to Gearheart (1)",
			"Allen_Gearheart_2"     =>"Allen to Gearheart (2)",
			"Allen_Gearheart_3"     =>"Allen to Gearheart (3)",
			"Gearheart_Hauser_Small"=>"Gearheart to Hauser (Small)",
			"Gearheart_Hauser_Big"  =>"Gearheart to Hauser (Big)",
			"Hauser_Brackish"       =>"Hauser to Brackish",
			"Hauser_Chl"            =>"Hauser to Chlorine Contact Basin",
			"Chl_Bay"               =>"Chlorine Contact Basin to Bay"      
			);
			
?>
